package com.qys.livesMall.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.framework.view.BaseQuery;
import com.qys.livesMall.shop.modal.dto.UseDataPackageDTO;
import com.qys.livesMall.shop.modal.entity.SysShopDataConsume;
import com.qys.livesMall.shop.modal.vo.ShopTrafficSurplusVO;
import com.qys.livesMall.shop.modal.vo.SysShopDataConsumeVO;

/**
 * 店铺流量消耗表(SysShopDataConsume)表服务接口
 *
 * @author makejava
 * @since 2023-07-04 10:12:54
 */
public interface SysShopDataConsumeService extends IService<SysShopDataConsume> {

    /**
     * 分页查询
     * @param dto
     * @return
     */
    IPage<SysShopDataConsumeVO> selectAll(BaseQuery dto);

    /**
     * 消耗流量
     * @param dto
     */
    void useDataPackage(UseDataPackageDTO dto);

    /**
     * 获取某个店铺的某个推广效果剩余量是否足量
     * @param shopId
     * @param packetEffectId
     * @return
     */
    boolean getSurplusByShopId(Long shopId, Long packetEffectId);

    /**
     * 查询店铺剩余流量
     * @param shopId
     * @return
     */
    ShopTrafficSurplusVO storeTrafficSurplus(String shopId);
}

